﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KQReports.aspx.cs" Inherits="WF.Web.Pages.HR.KQReports" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../../css/main.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
    <style type="text/css">
        #container { width: 100%; height: 800px; overflow: auto; }
        .dataGridExpand { float: left; width: 100%; }
        .settings_right_content { height: 400px; overflow-y: scroll; padding: 15px; }
        .inputQuery { width: 500px; height: 25px; padding: 0 0 0 15px; }
        .dvContent { position: relative; }
        .dvCover { height: 430px; width: 100%; z-index: 999; background-color: lightgray; position: absolute; opacity: 0.5; }
        .imgLoading { left: 275px; top: 202.5px; position: absolute; }
        .dvSearch { text-align: center; padding: 5px; }
    </style>

    <script type="text/javascript">
        $(function () {
            getDept();
        });

        function getDept() {
            doAsyncForCode({ args: "get" });
        }

        //一行接着一行绑定 人员列表数据绑定
        function dataBindLineByLine(data, isRebind) {
            if (isRebind) $(".genTr").remove();
            data = eval(data);
            if (data != undefined && data != "" && data.length > 0) {
                for (var i = 0; i < data.length; i++) {
                    var row = "";
                    row += "<tr class='genTr'>";
                    row += "<td>" + data[i].DeptName + "</td>";
                    row += "<td>" + data[i].DeptCode + "</td>";
                    row += "</tr>";
                    $("#tbDept").append(row);
                }
            }
            else {
                row += "<tr class='genTr'><td colspan='2'>没有数据</td></tr>";
                $("#tbDept").append(row);
            }
        }

        function doAsyncForCode(data) {
            $.ajax({
                url: "../../AshxHandler/HandlerDeptForRpt.ashx",
                data: data,
                success: function (data) {
                    dataBindLineByLine(data);
                }
            });
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="container">
            <div class="dvMain">

                <div class="dataGrid dataGridExpand">
                    <div class="ititle">
                        <h4 title="">报表分组</h4>
                    </div>
                    <div class="dvContent">
                        <div class="settings_left_content">
                            <div class="dvTitle">
                                <div class="dvSearch">
                                    <asp:TextBox CssClass="inputs inputQuery" placeholder="姓名 工号 账号" runat="server" ID="txtQuery"></asp:TextBox>

                                    <input tabindex="0" type="button" class="inputbtn" value="搜索" id="btnQuery" />
                                </div>
                                <div class="settings_userlist">
                                    <div class="dataGrid">
                                        <table id="tbDept" cellspacing="0" class="Grid">
                                            <tr>
                                                <th>部门名称</th>
                                                <th>部门编号</th>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </form>
</body>
</html>
